package jgl.vajra.kingkong.part.mine.model;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.kingkong.bean.LieEarnAmountBean;
import jgl.vajra.kingkong.bean.LieEarnCommissionBean;
import jgl.vajra.kingkong.part.mine.contract.LieEarnContract;
import jgl.vajra.kingkong.widget.manager.RxJavaHttpManager;
import jgl.vajra.kingkong.widget.manager.retrofit.RetrofitJsonManager;

public class LieEarnModel extends LieEarnContract.Model{
    @Override
    public Observable<LieEarnAmountBean> getLieEarnData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getLieEarnData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<List<LieEarnCommissionBean>> getLieEarnCommissionData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getLieEarnCommissionData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> getSpreadLevelData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getSpreadLevelData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> getLieEarnBalanceData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getLieEarnBalanceData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<String> getWithdrawalBalanceData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getWithdrawalBalanceData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
